require "#{__dir__}/base"
module Singularity
  module API
    class User < Singularity::API::Base
      def register(params={})
        user = @token.post('/api/accounts', params: params)
        Slient.user_info_callback_block.call user.parsed if user.error.nil?
        user
      end

      def get(id)
        @token.get("/api/accounts/#{id}")
      end

    end
  end
end